
package cz.czu.pef.DataModelling.beans;

import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import cz.czu.pef.DataModelling.ejb.api.*;

@Component
@ViewScoped
@ManagedBean
public class DataModellingBean implements ApplicationContextAware
{
	private static final long serialVersionUID = 6469829375417092825L;

	public static final Logger logger = Logger.getLogger(DataModellingBean.class.getName());

	private ApplicationContext applicationContext;

	@Autowired
	private DataModellingService dataModellingServiceEJB;

	protected DataModellingBean()
	{
		super();
	}

	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
	{
		this.applicationContext = applicationContext;
	}

	public List<Object[]> getAllMissingTrainings()
	{
		return dataModellingServiceEJB.getAllMissingTrainings();
	}
	public List<Object[]> getAllMissingMedicalExaminations()
	{
		return dataModellingServiceEJB.getAllMissingMedicalExaminations();
	}
	public List<Object[]> getAllMachineryWorkers()
	{
		// TODO: Implement this
		return new ArrayList<Object[]>();
	}
}
